cmake_minimum_required(VERSION 3.16)  # cmake版本最低3.10

project(ksvgeditor_app)

set(CMAKE_CXX_STANDARD 11) 

if(MSVC)
	add_compile_options(/Zc:__cplusplus)
endif()

SET(CMAKE_INCLUDE_CURRENT_DIR ON)
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTORCC ON)
SET(CMAKE_AUTOUIC ON)

find_package(Qt5 COMPONENTS Core Widgets Network Gui REQUIRED)

set(UI_FILES
)
set(RCC_FILES
../qrc/resources.qrc
)
set(HEADER_FILES
kapplication.h
)
set(CPP_FILES
kapplication.cpp
main.cpp
)

qt5_wrap_ui(UI_HEADERS ${UI_FILES})

source_group("Form Files" FILES ${UI_FILES})
source_group("Resource Files" FILES ${RCC_FILES})
source_group("Header Files" FILES ${HEADER_FILES})
source_group("Source Files" FILES ${CPP_FILES})

add_executable(${PROJECT_NAME} WIN32 ${HEADER_FILES} ${CPP_FILES} ${UI_FILES} ${RCC_FILES})

target_link_libraries(${PROJECT_NAME} 
	Qt5::Widgets
	Qt5::Core
	Qt5::Gui
	Qt5::Network


    ksvgeditor_core
    ksvgeditor_ui
    ksvgeditor_controller
    ksvgeditor_config
)